﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZX.OA.Model;
using ZX.OA.DAL;

namespace ZX.OA.BLL
{
    public class PowerRoleBLL
    {
        PowerRoleDAL dal = new PowerRoleDAL();
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="uname"></param>
        /// <param name="upass"></param>
        /// <returns></returns>
        public int Login(string uname, string upass)
        {
            return dal.Login(uname, upass);
        }
        /// <summary>
        /// 根据角色编号获取权限
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        public List<RolePowerInfo> GetPowerByRoleID(string uname, string upass)
        {
            return dal.GetPowerByRoleID(uname, upass);
        }
        /// <summary>
        /// 根据权限编号获取权限
        /// </summary>
        /// <param name="pid"></param>
        /// <returns></returns>
        public PowerInfo GetPowerByPid(int pid)
        {
            return dal.GetPowerByPid(pid);
        }
        /// <summary>
        /// 显示角色信息
        /// </summary>
        /// <returns></returns>
        public List<RoleInfo> ShowRoleInfo()
        {
            return dal.ShowRoleInfo();
        }
        /// <summary>
        /// 菜单列表
        /// </summary>
        /// <param name="ProviceID"></param>
        /// <returns></returns>
        public List<PowerInfo> ShowPower(int ProviceID)
        {
            return dal.ShowPower(ProviceID);
        }
        /// <summary>
        /// 获取个人考勤表
        /// </summary>
        /// <param name="UserName"></param>
        /// <param name="UserPass"></param>
        /// <returns></returns>
        public List<AttendanceInfo> ShowAttendanceInfoByUserID(string UserName, string UserPass)
        {
            return dal.ShowAttendanceInfoByUserID(UserName,UserPass);
        }
        /// <summary>
        /// 显示总考勤
        /// </summary>
        /// <returns></returns>
        public List<AttendanceInfo> ShowAttendance()
        {
            return dal.ShowAttendance();
        }
    }
}
